﻿<Window
	x:Uid="_this" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:my="clr-namespace:WgpgGUI"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	x:Class="WgpgGUI.CustomMessageBox"
	Name="_this"
    Loaded="this_Loaded"
	Title="MessageBox"
    Width="400"
    ResizeMode="NoResize"
    WindowStartupLocation="CenterOwner"
    ShowInTaskbar="False"
    SizeToContent="Height">
    
    <Window.Resources>
        <ResourceDictionary x:Uid="ResourceDictionary_1">
            <my:CustomMessageBoxImageConverter x:Uid="my:CustomMessageBoxImageConverter_1" x:Key="imageConverter" />
            <my:CustomMessageBoxMessageConverter x:Uid="my:CustomMessageBoxMessageConverter_1" x:Key="messageConverter" />
        </ResourceDictionary>
    </Window.Resources>

    <StackPanel x:Uid="StackPanel_1" VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
        <Grid x:Uid="Grid_1" VerticalAlignment="Stretch" Margin="20" HorizontalAlignment="Stretch">
            <Grid.ColumnDefinitions>
                <ColumnDefinition x:Uid="ColumnDefinition_1" Width="Auto"/>
                <ColumnDefinition x:Uid="ColumnDefinition_2" Width="*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition x:Uid="RowDefinition_1" Height="Auto"/>
            </Grid.RowDefinitions>
            
            <Image x:Uid="_image" Name="_image"
               Width="40"
               Height="40"
               VerticalAlignment="Top"
               Source="{Binding Converter={StaticResource imageConverter}, ElementName=_this, Path=MessageBoxImage}"
               Grid.Column="0" Grid.Row="0" Visibility="Collapsed"/>
            <ContentControl x:Uid="messagecontent" Name="messagecontent" Grid.Column="1" Grid.Row="0" Margin="20 0 0 0" VerticalAlignment="Center"
                            Content="{Binding ElementName=_this, Path=Message, Converter={StaticResource messageConverter}}"
                            IsTabStop="False">
            </ContentControl>
        </Grid>
        
        <StackPanel x:Uid="StackPanel_2" Background="#F0F0F0">
            <Border x:Uid="Border_1" BorderBrush="#DFDFE0" Height="1" BorderThickness="1"/>
            <StackPanel x:Uid="StackPanel_3" HorizontalAlignment="Right" Orientation="Horizontal">
                <Button x:Uid="_ok" Name="_ok" Click="ok_Click" Content="{Binding ElementName=_this, Path=OkButtonCaption}" Visibility="Collapsed"/>
                <Button x:Uid="_yes" Name="_yes" Click="yes_Click" Content="{Binding ElementName=_this, Path=YesButtonCaption}" Visibility="Collapsed"/>
                <Button x:Uid="_no" Name="_no" Click="no_Click" Content="{Binding ElementName=_this, Path=NoButtonCaption}" Visibility="Collapsed"/>
                <Button x:Uid="_cancel" Name="_cancel" Click="cancel_Click" Content="{Binding ElementName=_this, Path=CancelButtonCaption}" Visibility="Collapsed"/>
            </StackPanel>
        </StackPanel>
    </StackPanel>
</Window>